Skip to content

Conversation

@ahoppen
Copy link
Member

@ahoppen ahoppen commented Nov 22, 2024

Fixes #1670
rdar://136014520

@ahoppen
Copy link
Member Author

ahoppen commented Nov 22, 2024

@swift-ci Please test

// (https://github.com/swiftlang/sourcekit-lsp/issues/1267)
for target in request.targets {
if target == .forPackageManifest {
let packageManifestName = #/^Package@swift-(\d+)(?:\.(\d+))?(?:\.(\d+))?.swift$/#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is copy-pasted from SwiftPM, but I should note that .swift should be \.swift here. Would it be worth exposing the regex (or an API that returns all the manifests) from SwiftPM to ensure this remains up-to-date?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I copied it. I think threading it through from SwiftPM will be tricky (SwiftPM uses its own RegEx type IIRC) and I don’t expect it to change. So, I think copying is the best solution we have right now. And then, I’d also copy the regex as it’s written in SwiftPM, including the issue that it should really be \.swift.

@ahoppen ahoppen merged commit 3131ca3 into swiftlang:main Dec 3, 2024
3 checks passed
@ahoppen ahoppen deleted the version-specific-manifest branch August 4, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide semantic functionality in Package@swift-5.9.swift

2 participants